package com.jzo2o.customer.controller.agency;/**
 * @author wl
 * @version 1.0
 * @since 2025-09-17 14:39
 */

import com.jzo2o.customer.model.dto.request.AgencyCertificationAuditAddReqDTO;
import com.jzo2o.customer.service.IAgencyCertificationService;
import com.jzo2o.mvc.model.Result;
import io.swagger.annotations.Api;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * 机构认证
 *
 * @author itcast
 * @create 2023/7/7 19:34
 **/
@RestController("AgencyCertificationController")
@RequestMapping("/agency/agency-certification-audit")
@Api(tags = "机构认证端")
public class AgencyCertificationController {

    @Resource
    private IAgencyCertificationService agencyCertificationService;

    /**
     * 机构认证
     *
     * @param agencyCertificationAuditAddReqDTO 机构认证信息
     * @return void
     **/
    @PostMapping
    public void agencyCertificationAudit(@RequestBody AgencyCertificationAuditAddReqDTO agencyCertificationAuditAddReqDTO) {
        agencyCertificationService.agencyCertificationAudit(agencyCertificationAuditAddReqDTO);
    }


    @GetMapping("/rejectReason")
    public Result<String> rejectReason() {
        return Result.error(agencyCertificationService.rejectReason());
    }
}
